<%@ page import="java.util.ArrayList" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>JSP - Hello World</title>
</head>
<body>


<%--<%
    ArrayList<String> list = (ArrayList<String>) request.getAttribute("list");
    for (int i = 0; i < list.size(); i++) {
        String s = list.get(i);
        System.out.println(s);
    }
%>--%>


<%--<c:forEach items="${list}" var="str" varStatus="s">
    ${str} ${s.index} ${s.count} ${s.first} ${s.last} <br>
</c:forEach>


<c:set var="msg" value="hello jstl" scope="page"></c:set>


<c:set value="19" var="age" scope="page"></c:set>
${sessionScope.msg}


<c:if test="${empty msg}">
    <h1>msg not null!</h1>
</c:if>


<c:choose>
    <c:when test="${age <=12}">
        <h1>小登</h1>
    </c:when>
    <c:when test="${age >12 && a<=18}">
        <h1>中登</h1>
    </c:when>
    <c:otherwise>
        <h1>老登</h1>
    </c:otherwise>
</c:choose>--%>

<h1>当前在线人数 ${onlineUsers}</h1>
</body>
</html>